<template>
  <el-form
    ref="ruleForm"
    :model="ruleForm"
    :rules="rules"
    label-width="80px"
    size="small"
  >
    <el-form-item label="销量" prop="goodsSalesVolume">
      <el-input v-model.trim="ruleForm.goodsSalesVolume" placeholder="请输入销量"></el-input>
    </el-form-item>
  </el-form>
</template>

<script>
/* Mixins
------------------------------- */
import { Form } from '@/mixins'

/* Model
------------------------------- */
import { volumnModel } from '../model'

export default {
  mixins: [Form('ruleForm', volumnModel)],
  props: {},
  data () {
    return {
      ruleForm: Object.assign({}, volumnModel),
      rules: {
        goodsSalesVolume: [
          {
            required: true,
            message: this.$t('required', { field: '销量' })
          }
        ]
      }
    }
  }
}
</script>
